#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

int main() {
    int a[100][100] = { 0 };
    int x, y;
    scanf("%d, %d", &x, &y);
    for (int i = 0; i < x; i++) {
        for (int j = 0; j < y; j++) {
            a[i][j] = i * j;
        }
    }
    printf("[");
    for (int i = 0; i < x; i++) {
        printf("[");
        for (int j = 0; j < y; j++) {
            if (j == y - 1) {
                if (i == x - 1) {
                    printf("%d]", a[i][y - 1]);
                }
                else {
                    printf("%d], ", a[i][y - 1]);
                }
            }
            else {
                printf("%d, ", a[i][j]);
            }

        }
    }
    printf("]");
    return 0;
}